<extend name="Bt/login_base" />
<block name="content">
    {:W('Login/login',array('type'=>"login"))}
</block>
<block name="javascriptPageLevelPlugins">
    <script src="__JS__/bt/plugins/backstretch/jquery.backstretch.js" type="text/javascript" charset="utf-8"></script>
    <!--解决IE8的placeholder的兼容问题-->
    <script src="__JS__/bt/plugins//build/sea.js" type="text/javascript" charset="utf-8"></script>
    <script src="__JS__/bt/plugins/build/css3.js" type="text/javascript" charset="utf-8"></script>
    <script>
        seajs.config({
            debug: true,
            base: "__JS__/bt/plugins/build/"
        }).use(["placeholder"], function() {
        });
    </script>
</block>
<block name="javascriptPageLeveCode">
    <script type="text/javascript">
        $(function(){
            //背景图片
            $.backstretch("__IMG__/bt/backstretch/logoBack.png");
            //提交
            $('.userLogoBtn').on('click',function(){
                $('.colorRed').parent().hide();
                var self = $('form');
                $.post(self.attr("action"), self.serialize(), success, "json");
                return false;
                function success(data) {
                    if (data.status) {
                        if (data.url==undefined&&quickLogin == "quickLogin") {
                            window.location.reload();
                        } else {
                            window.location.href = data.url;
                        }
                    } else {
                        $('.colorRed').text(data.info);
                        $('.colorRed').parent().show();
                        $(".reloadverify").click();
                    }
                }
            });
            //更新验证码
            var verifyimg = $(".verifyimg").attr("src");
            $(".reloadverify").click(function () {
                if (verifyimg.indexOf('?') > 0) {
                    $(".verifyimg").attr("src", verifyimg + '&random=' + Math.random());
                } else {
                    $(".verifyimg").attr("src", verifyimg.replace(/\?.*$/, '') + '?' + Math.random());
                }
            });
            /*检测分辨率是否是小屏幕*/
			function redirectPage(){
				var screenWh = screen.width;
				if(screenWh <= 1366){
					//var navH = $(".navbar").css("height")+30;
					$(".logoUserRigth").css("marginTop",0);
				}
			}
			redirectPage();
        });
    </script>
</block>
